Semiconductor field-effect transistors (FETs) are commonly used for in microelectronics circuits and applications. One type of FET is a high electron mobility transistor (HEMT). A HEMT includes a barrier layer and a channel layer. A two-dimensional electron gas (2DEG) or a two-dimensional hole gas (2DHG) often forms at an interface between the barrier layer and the channel layer. Performance of the HEMT may be improved if the 2DEG or 2DHG is confined to the channel layer.